The present invention relates to an image forming apparatus, e.g., a laser-beam printer or the like, and image forming method for receiving data from a computer and performing printing on a medium, e.g., paper or the like, based on the received data.
Conventionally, a page printer, such as a laser-beam printer, employs an image formation method for supplying a printer with an image to be outputted which is expressed in a language independent of the printer resolution, and generating print data by a so-called rasterizing processing. Rasterizing processing is performed within the printer for converting the printer language into bitmap data corresponding to the resolution of the printer engine.
However, in the conventional rasterizing operation, it is necessary to store bitmap data, having a resolution corresponding to an output device, in a memory of the printer. Therefore, a memory area corresponding to the entire output page or a memory in a band unit corresponding to a part of the output page is necessary.
However, not all areas of an image to be outputted includes an object that needs rendering. Even in a case where output data mostly consists of blanks, the aforementioned memory area must be assigned. In view of this, efficient use of a memory area has been an issue that needs improvement.
The present invention is made in consideration of the above situation, and has as its object to provide an image forming apparatus and image forming method which can efficiently utilize a memory.
To achieve this object, the image forming apparatus and image forming method according to the present invention has the following configuration.
More specifically, the present invention provides an image forming apparatus for receiving inputted language describing an image to be outputted and generating a bitmap image for printing an image on a print medium, comprising: a physical memory for storing a program and data; a CPU for executing the program stored in the physical memory; a first address space for virtually storing data and a program executed when the CPU performs rasterizing operation; a second address space used for accessing the physical memory; address conversion means for performing mapping and management of address data from the first address space to the second address space in unit of a predetermined memory block; determination means for determining whether or not memory contents have been changed, in unit of the memory block managed by the address conversion means; and data supply means for supplying data, in place of the physical memory, when data is to be read out of the physical memory, wherein when an image is to be outputted, a physical memory corresponding to a memory block, whose contents have not been changed, is released according to a determination result of the determination means, and data generated by the data supply means is supplied when data is to be read out of the physical memory.
Furthermore, the present invention provides an image forming method of receiving inputted language describing an image to be outputted and generating a bitmap image for printing an image on a print medium, comprising: a step of storing a program and data in a physical memory; a step of causing a CPU to execute the program stored in the physical memory; a step of virtually storing in a first address space, data and a program executed when the CPU performs rasterizing operation; a step of accessing the physical memory by using a second address space; an address conversion step of performing mapping and management of address data from the first address space to the second address space in unit of a predetermined memory block; a determination step of determining whether or not memory contents have been changed, in unit of the memory block managed in the address conversion step; and a data supply step of supplying data, in place of the physical memory, when data is to be read out of the physical memory, wherein when an image is to be outputted, a physical memory corresponding to a memory block, whose contents have not been changed, is released according to a determination result of the determination step, and data generated at the data supply step is supplied when data is to be read out of the physical memory.
Moreover, according to an aspect of the present invention, the address conversion means extracts a corresponding page frame number from an associative memory based on a virtual page number stored in the first address space, and combines the extracted page frame number with offset data stored in the first address space to map address data to the second address space in unit of the memory block.
Moreover, according to an aspect of the present invention, the associative memory stores a virtual page number, page frame number, and flag information for identifying whether or not data contents have been changed.
Moreover, according to an aspect of the present invention, in the address conversion step, a corresponding page frame number is extracted from an associative memory based on a virtual page number stored in the first address space, and the extracted page frame number is combined with offset data stored in the first address space to map address data to the second address space in unit of the memory block.
Moreover, according to an aspect of the present invention, the associative memory stores a virtual page number, page frame number, and flag information for identifying whether or not data contents have been changed.
Moreover, according to an aspect of the present invention, the aforementioned image forming method further comprises the step of dividing an output image into a plurality of areas and rasterizing the plurality of areas when the CPU performs rasterizing operation.
Moreover, according to an aspect of the present invention, the aforementioned image forming apparatus further comprises: detection means for detecting same data or repetition of data when data is to be stored in the first address space; and storage means for storing a detection result of the same data or repetition of data in the address conversion means, wherein when an image is to be outputted, a physical memory corresponding to a memory block, having the same data or repetition of data, is released according to the detection result of the detection means, and data generated by the data supply means is supplied when data is to be read out of the physical memory.